package cn.pengpeng.day04.topn3;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Partitioner;

public class MyPatition extends Partitioner<MovieBean, NullWritable>{

	@Override
	public int getPartition(MovieBean key, NullWritable value, int numPartitions) {
		
		return (key.getUid().hashCode()& Integer.MAX_VALUE)%numPartitions;
	}

}
